package com.herenit.order_model.constant;

import java.util.HashMap;
import java.util.Map;

/**
 * 模拟的 医生 与 医院的 归属关系
 */
public class DoctorHospitalMap {
    private static Map<String,String> DOCTOR_HOSPITAL_MAP;

    static {
        DOCTOR_HOSPITAL_MAP = new HashMap();
        DOCTOR_HOSPITAL_MAP.put("doctorA1","hospitalA");
        DOCTOR_HOSPITAL_MAP.put("doctorA2","hospitalA");
        DOCTOR_HOSPITAL_MAP.put("doctorA3","hospitalA");

        DOCTOR_HOSPITAL_MAP.put("doctorB1","hospitalB");
        DOCTOR_HOSPITAL_MAP.put("doctorB2","hospitalB");

        DOCTOR_HOSPITAL_MAP.put("doctorC1","hospitalC");
        DOCTOR_HOSPITAL_MAP.put("doctorC2","hospitalC");
        DOCTOR_HOSPITAL_MAP.put("doctorC3","hospitalC");
        DOCTOR_HOSPITAL_MAP.put("doctorC4","hospitalC");
    }

    public static boolean checkDoctorAndHospital(String hospitalCode, String doctorCode){
        if (hospitalCode.equals(DOCTOR_HOSPITAL_MAP.get(doctorCode))){
            return true;
        }
        return false;
    }
}
